import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserInfoStore = defineStore('useUserIfon', () => {
  const token = ref('')

  const setToken = (value: string) => {
    token.value = value
  }

  const clearToken = () => {
    token.value = ''
  }

  return {
    token,
    setToken,
    clearToken
  }
}, {
  persist: true // 开启持久化
})
